package com.ohos.carbon.utils;

import ohos.agp.components.AttrSet;
import ohos.agp.components.Component;
import ohos.agp.components.Image;
import ohos.agp.components.ListContainer;
import ohos.agp.window.service.WindowManager;
import ohos.app.Context;
import ohos.multimodalinput.event.TouchEvent;

public class DragListView extends ListContainer implements Component.TouchEventListener {


    //按下选中的position
    private int mStartPosition;
    //需要达到的position
    private int mEndPosition;
    //手指在条目中的相对Y坐标
    private int dragPoint;
    //ListView在屏幕中的Y坐标
    private int dragOffset;
    //上
    private int upScroll;
    //下
    private int downScroll;
    //窗体
    private WindowManager wm;
    //显示的截图
    private Image dragImageView;
    //窗体参数
    private WindowManager.LayoutConfig lParams;

    //
    public DragListView(Context context) {
        super(context);
    }

    public DragListView(Context context, AttrSet attrSet) {
        super(context, attrSet);
    }

    public DragListView(Context context, AttrSet attrSet, String styleName) {
        super(context, attrSet, styleName);
    }


    @Override
    public boolean onTouchEvent(Component component, TouchEvent touchEvent) {
        switch (touchEvent.getAction()){
            case DRAG_DOWN:
                int contentPositionX = (int) component.getContentPositionX();
                int contentPositionY = (int) component.getContentPositionY();
                break;
        }
        return false;
    }
    
}
